include file from network directory

so i'm trying to include a .inc file in the beginning of my code
originally, it was stored locally on my computer so i included the file with the code:
#include <C:/Users/user/Desktop/Doors Addons/test.inc>
however, now I have moved the .inc to the network, and inorder to access this file, the directory is:
//USERS/PCBackups/Doors Addons/test.inc
if I try to include the file
#include <//USERS/PCBackups/Doors Addons/test.inc>
then it reads the // as a comment bar, and \\ doesn't work. i tried to create the directory name as a string and include it
string testfilename = "//USERS/PCBackups/Doors Addons/test.inc"
#include <testfilename>
but that doesn't work either. any help on this guys? Thanks!
phan423 - Thu Feb 23 13:20:24 EST 2012

Re: include file from network directory
llandale - Thu Feb 23 15:58:33 EST 2012

\\ works, but the first word needs to be the name of the server. Perhaps:
  • #include <\\MyNewServer\USERS\PCBackups\Doors Addons\test.inc>

  • Louie

Re: include file from network directory
phan423 - Thu Feb 23 19:30:15 EST 2012

llandale - Thu Feb 23 15:58:33 EST 2012
\\ works, but the first word needs to be the name of the server. Perhaps:

  • #include <\\MyNewServer\USERS\PCBackups\Doors Addons\test.inc>

  • Louie

this ended up working for me for anyone who might be curious

#include "//USERS/PCBackups/Doors Addons/test.inc"

Re: include file from network directory
adevicq - Fri Feb 24 03:32:41 EST 2012

phan423 - Thu Feb 23 19:30:15 EST 2012
this ended up working for me for anyone who might be curious

#include "//USERS/PCBackups/Doors Addons/test.inc"

Or if you absolutely want tu use backslashes you have to double them:

#include "\\\\myserver\\mydir\\mysubdir\\myinc.inc"

 


alain

 

Re: include file from network directory
llandale - Fri Feb 24 10:42:40 EST 2012

phan423 - Thu Feb 23 19:30:15 EST 2012
this ended up working for me for anyone who might be curious

#include "//USERS/PCBackups/Doors Addons/test.inc"

Curious, I've never used the quotes. Wonder if you need to do that when your path has a space in it.

What is "USERS", is that the actual name of some server?

-Louie